from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask import Flask
# from flask_apscheduler import APScheduler
import os

app = Flask(__name__)

manager = Manager(app)

app.config.from_pyfile("config/base_setting.py")
# ops_config=local|production
# linux export ops_config=local|production
# windows set ops_config=local|production
if "ops_config" in os.environ:
    app.config.from_pyfile("config/%s_setting.py" % (os.environ['ops_config']))
# print(os.environ)
# print(os.environ.get("ops_config"))


db = SQLAlchemy(app)
# scheduler = APScheduler()
# scheduler.init_app(app)

# app.logger.info('=========')
